package com.team.register.service;

import com.team.register.enums.PrintEnum;
import com.team.register.pojo.BaseUser;
import com.team.register.utils.FileUtil;
import com.team.register.utils.RoleUtil;

/**
 * @Description: 登录接口实现
 * @author: Jacky
 * @date: 2021.10.15
 */
public class LoginServiceImpl implements LoginService{

    @Override
    public Boolean signIn(String[] strs) {
        for (String str:strs){
            System.out.println(str);
        }
        BaseUser user = FileUtil.read(strs[1]);
        System.out.println(user.toString());
        if (strs[0].equals(user.getRole().toString())&&strs[2].equals(user.getPassword())){
            return true;
        }
        return false;
    }
}